﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:SynergyControls">

    <!-- Region: RhythmButtonBar -->
    <LinearGradientBrush
        x:Key="CanvasBackgroundBrush"
        Opacity=".5"
        EndPoint="0.5,1.1"
                         StartPoint="0.4,0">
        <GradientStop Color="Black" Offset="0"/>
        <GradientStop Color="WhiteSmoke" Offset=" 0.89"/>
    </LinearGradientBrush>
    <LinearGradientBrush
        x:Key="ButtonsStrokeBrush"
        EndPoint="0.5,0"
                         StartPoint="0.5,1">
        <GradientStop Color="Black" Offset="0"/>
        <GradientStop Color="WhiteSmoke" Offset=" 0.89"/>
    </LinearGradientBrush>
    <LinearGradientBrush
        x:Key="ButtonsOffBrush"
                         EndPoint="0.5,0"
                         StartPoint="0.5,1">
        <GradientStop Color="Black"
                      Offset="0"/>
        <GradientStop Color="Gray"
                      Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush
        x:Key="ButtonsOnBrush"
                         EndPoint="0.5,0"
                         StartPoint="0.5,1">
        <GradientStop Color="Red"
                      Offset="0" />
        <GradientStop Color="Orange"
                      Offset="1" />
    </LinearGradientBrush>

    <Style TargetType="{x:Type local:RhythmButtonBar}">
        <Setter Property="ButtonOnStyle">
            <Setter.Value>
                <Style TargetType="{x:Type Rectangle}">
                    <Setter Property="Fill"
                            Value="{StaticResource ButtonsOnBrush}" />
                    <Setter Property="Stroke"                            
                            Value="{StaticResource ButtonsStrokeBrush}"/>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="ButtonOffStyle">
            <Setter.Value>
                <Style TargetType="{x:Type Rectangle}">
                    <Setter Property="Fill"
                            Value="{StaticResource ButtonsOffBrush}" />
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">

            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:RhythmButtonBar}">
                    <Border
                        BorderBrush="{StaticResource CanvasBackgroundBrush}"                        
                        BorderThickness=".5">
                        <Grid x:Name="LayoutRoot">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>
                            <StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Center">
                                <Label
                                    Content="temporary Bar Content"
                                x:Name="PART_BarLabel"
                                FontSize="12" />
                                <Label 
                                    Content="temporary Phrase Content"
                                x:Name="PART_PhraseLabel"
                                FontSize="12" />
                                <Button Content="Quick Pattern" x:Name="PART_BtnQuickPattern"/>
                            </StackPanel>
                            <Canvas                                
                                Grid.Row="1"                               
                            HorizontalAlignment="Stretch"
                            VerticalAlignment="Stretch"
                            Width="340"
                            Height="30"
                            x:Name="PART_Canvas"
                                ClipToBounds="True" />
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!-- EndRegion RhythmButtonBar -->

</ResourceDictionary>